<?php
/**
 * Created by PhpStorm.
 * User: 554665488
 * Date: 2018-6-19
 * Time: 17:53
 * @description:适配器模式测试
 * @Author: yfl
 * @QQ 554665488
 */
define('BASEDIR', __DIR__ . '/..');


require_once __DIR__ . '/Loader.php';
spl_autoload_register("\\DesignModel\\Loader::autoload");


$mysql = new \DesignModel\database\mysqli();

$mysql->connect('127.0.0.1', 'root', 'Abc123!Abc', 'tp_shop');
$res = $mysql->query('show tables');
//var_dump($res);
//$mysql->close();


$pdo = new \DesignModel\database\pdo();

$pdo->connect('127.0.0.1', 'root', 'Abc123!Abc', 'tp_shop');
$res=$pdo->query('select * from tp_admin');
var_dump($res);
$pdo->close();